package com.ms.service.module.account;

import java.util.HashMap;


/**
 * 體驗帳號角色群組列舉
 */
public enum TrialAccountGroup {

	/**錢多多*/
	GROUP_0(0, 6010330),
	
	;
	
	
	
	/**群組上限(包含)*/
	public static final int MAX_LIMIT = 99;
	
	/**群組下限(包含)*/
	public static final int MIN_LIMIT = 0;
	
	/**
	 * 一個體驗帳號群組的上限人數(playerNameNumber)<br>
	 * 因為受限初始設定的體驗帳號格式，所以從LoginModule.MAX_PLAYERNAME_NUMBER_TOTAL獨立出來自己限制
	 */
	public static final int TRIAL_PLAYER_MAX_LIMIT_PER_GROUP = 9999;
	
	public static HashMap<Integer, TrialAccountGroup> lookUP = new HashMap<Integer, TrialAccountGroup>();
	
	static{
		for(TrialAccountGroup group : TrialAccountGroup.values()){
			lookUP.put(group.getGroupID(), group);
		}
	}
	
	/**
	 * 群組編號
	 */
	private int groupID;
	
	/**
	 * 角色名稱對應的stringTableID
	 */
	private int playerNameStringTableID;
	
	private TrialAccountGroup(int groupID, int playerNameStringTableID){
		this.groupID = groupID;
		this.playerNameStringTableID = playerNameStringTableID;
	}
	
	/**
	 * 找尋ID對應的群組
	 */
	public static TrialAccountGroup lookUpByID(int accountGroupID){
		return lookUP.get(accountGroupID);
	}
	
	public int getGroupID(){
		return this.groupID;
	}
	
	public int getStringTableID(){
		return this.playerNameStringTableID;
	}
	
}
